import { defineConfig, DefaultTheme } from 'vitepress'
import mdx from '@mdx-js/rollup'
import react from '@vitejs/plugin-react-swc'

export default defineConfig({
    title: `one-codes`,
    description: '开发与产品都能使用的低代码引擎',
  
    head: [
        ['link', { rel: 'icon', type: 'image/svg+xml', href: '/logo.svg' }],
        ['meta', { property: 'og:type', content: 'website' }],
        ['meta', { name: 'twitter:card', content: 'summary_large_image' }],
        ['meta', { name: 'twitter:site', content: '@vite_js' }],
        ['meta', { name: 'theme-color', content: '#646cff' }],
    ],
    //   locales: {
    //     root: { label: 'English' },
    //     zh: { label: '简体中文', link: 'https://cn.vitejs.dev' },
    //     ja: { label: '日本語', link: 'https://ja.vitejs.dev' },
    //     es: { label: 'Español', link: 'https://es.vitejs.dev' },
    //     pt: { label: 'Português', link: 'https://pt.vitejs.dev' },
    //   },\
    themeConfig: {
        logo: '/logo.svg',
        
        
        editLink: {
            pattern: 'https://github.com/vitejs/vite/edit/main/docs/:path',
            text: 'Suggest changes to this page',
        },
        socialLinks: [
            { icon: 'twitter', link: 'https://github.com/wen-haoming/one-codes' },
            { icon: 'github', link: 'https://github.com/wen-haoming/one-codes' },
        ],

        // algolia: {
        //   appId: '7H67QR5P0A',
        //   apiKey: 'deaab78bcdfe96b599497d25acc6460e',
        //   indexName: 'vitejs',
        //   searchParameters: {
        //     facetFilters: ['tags:en'],
        //   },
        // },
        footer: {
            message: `Released under the MIT License.`,
            copyright: 'Copyright © 2019-present Evan You & Vite Contributors',
        },

        nav: [
            { text: 'Guide', link: '/guide/', activeMatch: '/guide/' },
            { text: 'Config', link: '/config/', activeMatch: '/config/' },
            { text: 'Plugins', link: '/plugins/', activeMatch: '/plugins/' },

        ],

        sidebar: {
            '/guide/': [
                {
                    text: 'Guide',
                    items: [
                        {
                            text: 'Why Vite',
                            link: '/guide/why',
                        },
                        {
                            text: 'Getting Started',
                            link: '/guide/',
                        },
                        {
                            text: 'Features',
                            link: '/guide/features',
                        },
                        {
                            text: 'CLI',
                            link: '/guide/cli',
                        },
                        {
                            text: 'Using Plugins',
                            link: '/guide/using-plugins',
                        },
                        {
                            text: 'Dependency Pre-Bundling',
                            link: '/guide/dep-pre-bundling',
                        },
                        {
                            text: 'Static Asset Handling',
                            link: '/guide/assets',
                        },
                        {
                            text: 'Building for Production',
                            link: '/guide/build',
                        },
                        {
                            text: 'Deploying a Static Site',
                            link: '/guide/static-deploy',
                        },
                        {
                            text: 'Env Variables and Modes',
                            link: '/guide/env-and-mode',
                        },
                        {
                            text: 'Server-Side Rendering (SSR)',
                            link: '/guide/ssr',
                        },
                        {
                            text: 'Backend Integration',
                            link: '/guide/backend-integration',
                        },
                        {
                            text: 'Comparisons',
                            link: '/guide/comparisons',
                        },
                        {
                            text: 'Troubleshooting',
                            link: '/guide/troubleshooting',
                        },
                        {
                            text: 'Migration from v3',
                            link: '/guide/migration',
                        },
                    ],
                },
                {
                    text: 'APIs',
                    items: [
                        {
                            text: 'Plugin API',
                            link: '/guide/api-plugin',
                        },
                        {
                            text: 'HMR API',
                            link: '/guide/api-hmr',
                        },
                        {
                            text: 'JavaScript API',
                            link: '/guide/api-javascript',
                        },
                        {
                            text: 'Config Reference',
                            link: '/config/',
                        },
                    ],
                },
            ],
            '/config/': [
                {
                    text: 'Config',
                    items: [
                        {
                            text: 'Configuring Vite',
                            link: '/config/',
                        },
                        {
                            text: 'Shared Options',
                            link: '/config/shared-options',
                        },
                        {
                            text: 'Server Options',
                            link: '/config/server-options',
                        },
                        {
                            text: 'Build Options',
                            link: '/config/build-options',
                        },
                        {
                            text: 'Preview Options',
                            link: '/config/preview-options',
                        },
                        {
                            text: 'Dep Optimization Options',
                            link: '/config/dep-optimization-options',
                        },
                        {
                            text: 'SSR Options',
                            link: '/config/ssr-options',
                        },
                        {
                            text: 'Worker Options',
                            link: '/config/worker-options',
                        },
                    ],
                },
            ],
        },
        
    },
})